import 'package:flutter/material.dart';

class wuzhuangtai extends StatelessWidget {
  wuzhuangtai({super.key, this.age});
  int? age;
  final name = '王';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //导航条
      appBar: AppBar(
        title: Text('无状态组件',
            style: TextStyle(
                fontSize: 24,
                fontWeight: FontWeight.w600,
                color: Colors.white)),
        centerTitle: true,
        backgroundColor: Colors.pink,
      ),
      //主体区域
      body: Center(
        child: Text(
          '我叫$name,今年$age岁',
          style: TextStyle(fontSize: 25),
        ),
      ),
    );
  }
}
